package HomeWork;

import java.io.File;
import java.io.FileFilter;

public class HemoWork02 {
    public static void main(String[] args) {
        File file = new File("./");
        File[] files = file.listFiles(f->f.getName().contains("s")  );
        for(File  i:files){
            System.out.println(i.getName());
        }
        File[] files1 = file.listFiles(new FileFilter() {
            @Override
            public boolean accept(File f) {
                return f.getName().contains("s");
            }
        });
        for(File f :files1){
            System.out.println(f.getName());
        }
    }
}
